#pragma once

#include "../instrument.h"
#include "..\Gangia_GUI.h"
#include <wx/ctb/timer.h>

class InteractivePlayFile :	public Instrument,FilePlayFrame
{
public:
	InteractivePlayFile(wxWindow *pParent);
	void *Entry(void);
	void StartDevice(wxString FileName,wxString FilePath,bool File);
	void StopDevice(void);
	int OpenPort(const char *PortCom, const char *OpenVal2, const char *OpenVal3);;

	void SelectFile(int Index);
	
public:
	volatile int				CurrentFile;
	void OnCenter(wxCommandEvent& event)
	{
		SelectFile(0);
	}
	void OnUp(wxCommandEvent& event)
	{
		SelectFile(3);
	}
	void OnRight(wxCommandEvent& event)
	{
		SelectFile(2);
	}
	void OnDown(wxCommandEvent& event)
	{
		SelectFile(4);
	}
	void OnLeft(wxCommandEvent& event)
	{
		SelectFile(1);
	}
	

	DECLARE_EVENT_TABLE();
	~InteractivePlayFile(void);

private:
	wxFile File[5];
	
	timer			*pTimer;
};

